Hello,
I am currently working on an event study, which includes a little bit over 5,000 firms and five distinct events. I want to use Stata's sureg command to run a seemingly unrelated regression for all of my sample's firms.
I created a loop for the sureg command, which looks as follows:
"ER_`var'" is the excess return of the firm on a given day, "premium_m" denotes the market premium on that day and "event_X" is a dummy variable indicating whether that day is considered an event day.
The above mentioned code also works and runs smoothly if I only use a couple of firms. However, if I run the code with all 5,000 variables, Stata crashes after a while.
My question is therefore whether there is any way to prevent this or to adapt my code that I can run the seemingly unrelated regression. I am using Stata/MP 17.0.
Thank you very much in advance for your help.
Kind regards,
Peter
I am currently working on an event study, which includes a little bit over 5,000 firms and five distinct events. I want to use Stata's sureg command to run a seemingly unrelated regression for all of my sample's firms.
I created a loop for the sureg command, which looks as follows:
Code:
local eqs "" foreach var of varlist firm1 - firm5000 { local eqs "`eqs' (ER_`var' premium_m event_1 event_2 event_3 event_4 event_5)" } sureg `eqs', notable test event_1 event_2 event_3 event_4 event_5
The above mentioned code also works and runs smoothly if I only use a couple of firms. However, if I run the code with all 5,000 variables, Stata crashes after a while.
My question is therefore whether there is any way to prevent this or to adapt my code that I can run the seemingly unrelated regression. I am using Stata/MP 17.0.
Thank you very much in advance for your help.
Kind regards,
Peter
Comment